<%--
  Created by IntelliJ IDEA.
  User: xiaofeng
  Date: 2025/5/19
  Time: 20:07
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
  request.setAttribute("k1","request-k1数据");
  pageContext.setAttribute("k1","pageContext数据");
  session.setAttribute("k1", "session-k1数据");
  application.setAttribute("k1", "application-k1数据");
%>
jsp中
<%=request.getAttribute("k1")%>
EL方式
${requestScope.k1}<br/>
${pageScope.k1}<br/>
${sessionScope.k1}<br/>
${applicationScope.k1}<br/>
</body>
</html>
